<!-- 美发师 -->
<template>
	<view>
		<!-- //列表 -->
		<view class="list" v-for="(item,index) in 4" :key='index'>
			<view class="list_top">
				<view class="top_text">
					<text>05月05日</text>
					<text>洗剪吹</text>
					<text>欧莱雅生化烫</text>
				</view>
				<view class="top_price">
					<text>￥888.00</text>
				</view>
			</view>
			<view class="shiijian">
				<text>2020-05-05 15: 55: 50</text>
			</view>
			
			<view class="list_bottom">
				<view class="list_bottom_pic">
					<u-avatar src="https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1194131577,2954769920&fm=26&gp=0.jpg" size='87' show-sex='true'  sex-icon='woman'></u-avatar>
				</view>
				<view class="list_bottom_right">
					<view>
						<view class="right_text1">
							<text>张艺兴  美发师  </text>
							<text class="type">高级</text>
							<text class="icon iconfont" v-for="(items,indexs) in 4" :key='indexs'>&#xe621;</text>
							
						</view>
						<view class="right_text2">
							<text>好评4.7分丨服务234次</text>
						</view>
						<view class="right_text3">
							<text class="zw">职位：</text>
							<text class="dz">店长</text>
							<text class="zw">从业：</text>
							<text class="dz">10年</text>
						</view>
						<view class="right_text3">
							<text class="zw">擅长：</text>
							<text class="dz">短发裁剪   染发设计</text>
							
						</view>
					</view>
					<view class="mores">
						<view class="more_btn" @click="more(index)">
							···	
						</view>
						<view class="once_more">
							<text>再次预约</text>
						</view>
						<view class="operating" v-if="operating==index">
							<view @click="del(index)">
								<text class="icon iconfont">&#xe608;</text>
							</view>
							<view @click="shar(index)">
								<text class="icon iconfont">&#xe632;</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				operating:null,//用于显示操作删除按钮
				can_index:0,
			}
		},
		methods:{
			//删除
			del(index){
				uni.showModal({
					title:'删除服务',
					content:'确定要删除这个设计师吗',
					success:function(res){
						  if (res.confirm) {
						            console.log('用户点击确定');
									this.operating = null
						        } else if (res.cancel) {
						            console.log('用户点击取消');
									this.operating = null
						        }
					}
				})
			},
			//点击。。。
			more(index){
				this.operating = index
				this.can_index++
				if(this.can_index>=2){
					this.operating = null
					this.can_index = 0
				}
			},
			shar(index){
				uni.showToast({
					icon:'none',
					title:'功能开发中'
				})
				this.operating = null
			}
		}
	}
</script>

<style scoped lang="less">
	.list{
		padding: 20rpx 24rpx;
		background: white;
		margin-top: 19rpx;		
		box-shadow: 0px 2rpx 7rpx 0px rgba(113, 113, 113, 0.26);
		border-radius: 4rpx;
		.list_top{
			display: flex;
			align-items: center;
			justify-content: space-between;
			.top_text{				
				font-size: 28rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #282828;
				line-height: 30rpx;
				text{
					margin-right: 15rpx;
				}
			}
			.top_price{				
				font-size: 28rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #000000;
			}
		}
		.shiijian{
			padding-top: 10rpx;
			padding-bottom: 10rpx;
			font-size: 16rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #5D5D5D;
			border-bottom: 1rpx solid #E1E1E1;
		}
		.list_bottom{
			display: flex;
				margin-top: 15rpx;
			.list_bottom_pic{
				margin-right: 32rpx;
				padding-top: 15rpx;
			}
			.list_bottom_right{
				display: flex;
				justify-content: space-between;
			
				width: 100%;
				.right_text1{
					text{						
						font-size: 24rpx;
						font-family: PingFang;
						font-weight: 500;
						color: #333333;
					}
					.type{
						margin-right: 20rpx;
						margin-left: 20rpx;
						font-size: 24rpx;
						font-family: PingFang;
						font-weight: 500;
						color: #8A8A8A;
					}
					.iconfont{
						color: #F2CB51;
					}
				}
				.right_text2{
					
					font-size: 18rpx;
					font-family: PingFang;
					font-weight: 500;
					color: #777777;
					line-height: 33rpx;
				}
				.right_text3{
					font-size: 18rpx;
					font-family: PingFang;
					font-weight: 500;
					color: #777777;
					line-height: 33rpx;
					.zw{
						font-weight: bold;
					}
					.dz{
						margin-right: 43rpx;
						font-size: 18rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #565555;
					}
				}
			}
			.mores{
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				align-items: flex-end;
				position: relative;
				.once_more{
					width: 150rpx;
					height: 64rpx;
					background: #00C6C2;
					border-radius: 4rpx;
					text-align: center;
					line-height: 58rpx;
					text{
						color: white;						
						font-size: 26rpx;
						font-family: PingFang;
						font-weight: 500;
						opacity: 0.8;
					}
				}
				.more_btn{
					width: 51rpx;
					height: 28rpx;
					background: #F1F1F1;
					border-radius: 14rpx;
					text-align: center;
					line-height: 28rpx;
					color: #676767;
					
				}
				.operating{
					width: 150rpx;
					background: #00C6C2;
					display: flex;
					align-items: center;
					justify-content: space-around;
					opacity: 0.8;
					position: absolute;
					top: 0;
					right: 80rpx;
					.iconfont{
						color: white;
						font-size: 30rpx;
					}
				}
			}
		}
	}
</style>
<style>
	page{
		padding-bottom: 20rpx;
	}
</style>
